<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
        {{msg}}
        <sub-a title="好热啊邮"></sub-a>
        <sub-a :a="name"></sub-a>
    </div>
    <script src="../vue.js"></script>
    <script>
        Vue.component('sub-a', {
            props: ['title', 'a'],
            data() {
                return {
                    mag: '子组件的值 我头大死了'
                }
            },
            template: `
              <div>
                    <div>{{mag + '-----'+ title  }}</div><br>
                    <div>{{mag + '-----'+ title +'-----'+a  }}</div>
              </div>
            `
        })
        new Vue({
            el: "#app",
            data: {
                msg: "父组件的值 你好",
                name: '请问你叫什么呢'
            }
        })
    </script>
</body>

</html>